]> dgit.raspbian.org Git - gnome-shell.git/commit
dialog: Ensure action callback is called with no arguments
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Apr 2021 16:37:58 +0000 (18:37 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Apr 2021 17:12:59 +0000 (19:12 +0200)
commitd8231413601e930a4435734160fc0f44869f3a3f
treefa0603b714dad2454697600afcde3e1425c306ac
parent7eba5322b51969c0fe456e2d737423094afccbb7
dialog: Ensure action callback is called with no arguments

Using the callback directly as signal handler means that it will
receive the signal parameters (in this case: the StButton instance
that emits the signal).

This leaks an implementation detail that is harmless in the best
case, but can break dialogs when using bind() on the callback.

Avoid that trap by explicitly calling the callback without arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4139

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1819>
js/ui/dialog.js